<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        用户：<input type="text" v-model="userName"><br><br>
        密码：<input type="password" v-model="userMima"><br><br>
        <button @click="login">登录</button>
        <button @click="revst">重置</button>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                userName: '',
                userMima: ''
            },
            methods: {
                login() {
                    console.log(this.userName, this.userMima);

                },
                revst() {
                    this.userName = '';
                    this.userMima = '';
                }
            }
        });
    </script>
</body>

</html>